import Vue from 'vue'
import Vuex from 'vuex'

import createPersistedState from "vuex-persistedstate"
Vue.use(Vuex)

export default new Vuex.Store({
	
  plugins: [createPersistedState()],
  state: {
		name,
		loginflag:true,
		mealid:0,
		mealflag:false,
		majorMealid:0,
		majorMealflag:false,
		bbsInfoflag:false,
		staffInfoflag:false,
		userInfoflag:false,
		orderInfoflag:false,
		longOrderInfoflag:false,
		majorOrderInfoflag:false,
		shortOrderNum:0,
		longOrderNum:0,
		majorOrderNum:0,
		daylist:""
  },
  mutations: {
		updateLogin(state,flag){
			state.loginflag=flag;
		},
		updateMeal(stage,flag){
			stage.mealflag=flag
		},
		updateMealid(stage,id){
			stage.mealid=id
		},
		updateMajorMeal(stage,flag){
			stage.majorMealflag=flag
		},
		updateMajorMealid(stage,id){
			stage.majorMealid=id
		},
		updateBbsInfoflag(stage,flag){
			stage.bbsInfoflag=flag
		},
		updateStaffInfoflag(stage,flag){
			stage.staffInfoflag=flag
		},
		updateUserInfoflag(stage,flag){
			stage.userInfoflag=flag
		},
		updateOrderInfoflag(stage,flag){
			stage.orderInfoflag=flag
		},
		updateLongOrderInfoflag(stage,flag){
			stage.longOrderInfoflag=flag
		},
		updateMajorOrderInfoflag(stage,flag){
			stage.majorOrderInfoflag=flag
		},
		updateShortOrderNum(stage,num){
			stage.shortOrderNum=num
		},
		updateLongOrderNum(stage,num){
			stage.longOrderNum=num
		},
		updateMajorOrderNum(stage,num){
			stage.majorOrderNum=num
		},
		updateDaylist(stage,num){
			stage.daylist=num
		}
		
		
  },
  actions: {

  },
	getters: {
		
	},
	modules: {
		
	}
	
})
